package com.seednia.module.core.resource.dto;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import com.seednia.foundation.framework.dto.AbstractRecord;
import com.seednia.module.core.tagging.dto.ITaggable;
import com.seednia.module.core.tagging.dto.TaggingDto;

/**
 * Tagging for Post record
 * 
 * @author Young Suk Ahn
 *
 */
@XmlRootElement(name = "ResourceTaggingDto", 
namespace = "http://seednia.com/core/1.0")
@XmlType(name = "ResourceTaggingDto")
@XmlAccessorType(XmlAccessType.PROPERTY)
public class ResourceTaggingDto extends TaggingDto {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 5199802318414461676L;
	
	public static final String TAG_TYPE = "Media";
	
	ResourceTaggingDto () {}
	
	public ResourceTaggingDto(ITaggable taggable)
	{
		super(taggable, TAG_TYPE);
	}
	
	/**
	 * To create object from JSONP string
	 * Used by the REST framework when sending this object as parameter
	 * @param jsonStr
	 * @return
	 */
	public static ResourceTaggingDto fromString(String jsonStr) {
		ResourceTaggingDto retval = (ResourceTaggingDto) AbstractRecord.fromString(ResourceTaggingDto.class, jsonStr);
		return retval;
	}
}
